home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 1.iso / desktop / papcw10.zip / TEST.PRG < prev    next >
Text File  |  1995-01-21  |  3KB  |  212 lines

  1. LBL test1
  2. 2
  3. 2
  4. +
  5. PUTS "\nresult is"
  6. 10 WIDTH PUTSTACK
  7. PUTS "\n"
  8. END
  9.  
  10. LBL test2
  11. PROMPT "Enter a number 1, 2, or 3, or CR to exit: "
  12. ; next line executed if just a CR is entered
  13. GTO done
  14. ; here if a number was entered
  15. 1 <
  16. GTO error
  17. 3 >
  18. GTO error
  19. JMP
  20. GTO one
  21. GTO two
  22. GTO three
  23. LBL error
  24. PUTS "   You didn't follow instructions\n"
  25. GTO test2
  26. LBL one
  27. PUTS "   You entered 1\n"
  28. GTO test2
  29. LBL two
  30. PUTS "   You entered 2\n"
  31. GTO test2
  32. LBL three
  33. PUTS "   You entered 3\n"
  34. GTO test2
  35. LBL done
  36. PUTS "   You entered a CR\n"
  37. END
  38.  
  39. LBL test3
  40. 100
  41. 1
  42. STO
  43. 200
  44. 1
  45. STO+   ; note this is counted as two instructions not one
  46. END
  47.  
  48. LBL test4
  49. PUTS "     Calling subroutine SUB1\n"
  50. XEQ sub1
  51. PUTS "     Back in main\n"
  52. RTN
  53. LBL sub1
  54. PUTS "     Now in subroutine SUB1\n"
  55. END
  56.  
  57. LBL test5
  58. PUTS "     About to Pause\n"
  59. PAUSE
  60. PUTS "     OK\n"
  61. END
  62.  
  63. LBL test6
  64. PUTS "     About to STOP, enter RUN to continue\n"
  65. STOP
  66. PUTS "     You just entered RUN\n"
  67. END
  68.  
  69. LBL test7
  70. 5 fix
  71. CLRG
  72. CLST
  73. 10.00001 0 STO ; block control word to loop 10 times incrementing by 1
  74. 0          ; put 0 on stack
  75. LBL loop7
  76. 1+
  77. 0 RCL 0 WIDTH PUTSTACK DROP PUTS "\n"  ; show bcw
  78. 0 DSE
  79. GTO loop7
  80. RTN
  81. END
  82.  
  83. LBL test8
  84. 5 fix
  85. CLRG
  86. CLST
  87. 0.00902 0 STO ; block control word to loop 5 times incrementing by 2
  88. 0          ; put 0 on stack
  89. LBL loop8
  90. 1+
  91. 0 RCL 0 WIDTH PUTSTACK DROP PUTS "\n"   ; show bcw
  92. 0 ISG
  93. GTO loop8
  94. RTN
  95. END
  96.  
  97. LBL test9
  98. 3 FS
  99. 3 FS?
  100. GTO 9a
  101. GTO 9e
  102. ;
  103. LBL 9a
  104. PUTS "     Flag 3 was set\n"
  105. 3 FC
  106. 3 FC?
  107. GTO 9b
  108. GTO 9e
  109. ;
  110. LBL 9b
  111. PUTS "     Flag 3 was clear\n"
  112. 3 FS
  113. 3 FS?C
  114. GTO 9c
  115. GTO 9e
  116. ;
  117. LBL 9c
  118. PUTS "     Flag 3 was set, and is now clear\n"
  119. 3 FC?C
  120. GTO 9d
  121. GTO 9e
  122. ;
  123. LBL 9d
  124. PUTS "     Flag 3 was clear, and is now clear\n"
  125. RTN
  126. ;
  127. LBL 9e
  128. PUTS "     Error\n"
  129. END
  130.  
  131. LBL test10
  132. 100
  133. 101 <
  134. GTO 10a
  135. GTO 10f
  136. ;
  137. LBL 10a
  138. PUTS "     100 is less than 101\n"
  139. 99 <
  140. GTO 10f
  141. PUTS "     100 is not less than 99\n"
  142. 100 ==
  143. GTO 10b
  144. GTO 10f
  145. ;
  146. LBL 10b
  147. PUTS "     100 is equal to 100\n"
  148. 99 >
  149. GTO 10c
  150. GTO 10f
  151. ;
  152. LBL 10c
  153. PUTS "     100 is greater than 99\n"
  154. 101 >
  155. GTO 10f
  156. PUTS "     100 is not greater than 101\n"
  157. 100 <=
  158. GTO 10d
  159. GTO 10f
  160. ;
  161. LBL 10d
  162. PUTS "     100 is <= 100\n"
  163. 100 >=
  164. GTO 10e
  165. GTO 10f
  166. ;
  167. LBL 10e
  168. PUTS "     100 is >= 100\n"
  169. RTN
  170. ;
  171. LBL 10f
  172. PUTS "     error\n"
  173. END
  174.  
  175. LBL test11
  176. 1 2 3 4 5 6 7 8 9 10
  177. 010.01901 0 sto
  178. 0 stom
  179. shows
  180. 0 rclm
  181. shows
  182. END
  183.  
  184. LBL test12
  185. puts "Default tab (5)\n"
  186. puts "12345678901234567890123456789012345678901234567890\n"
  187. puts "\t1\t2\t3\t4\t5\n"
  188. puts "\tABC\t123\t\tXYZ\n"
  189. 8 TABSET
  190. puts "Tabs have been set to eight\r"
  191. puts "12345678901234567890123456789012345678901234567890\n"
  192. puts "\t1\t2\t3\t4\t5\n"
  193. puts "\tABC\t123\t\tXYZ\n"
  194. END
  195.  
  196. LBL test13
  197. 123456789 
  198. 10 width putstack puts "\n"
  199. 11 width putstack puts "\n"
  200. 12 width putstack puts "\n"
  201. 13 width putstack puts "\n"
  202. 14 width putstack puts "\n"
  203. 15 width putstack puts "\n\n"
  204. drop
  205. 4 fix
  206. .1234
  207. 4 width putstack puts "\n"
  208. 5 width putstack puts "\n"
  209. 6 width putstack puts "\n"
  210. 7 width putstack puts "\n"
  211. drop
  212. END